#include <iostream>
#include <vector>
using namespace std;

int main()
{
	string str;
	char ret;
	int maxn=0;
	vector<int> cnt(26);
	while(cin>>str)
	{
		for(auto& t:str)
		{
			cnt[t-'a']++;
			if(cnt[t-'a']>maxn)
			{
				ret=t;
				maxn=cnt[t-'a'];
			}
		}
	}

	cout<<ret<<endl;
	return 0;
}
